package com.googlecode.wicketslides.demo;

import org.apache.wicket.markup.html.IHeaderResponse;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.request.resource.PackageResourceReference;

import com.googlecode.wicketslides.SlidesPanel;
import com.googlecode.wicketslides.WicketSlides;

public class GalleryDemoPage extends WebPage
{
	private static final long serialVersionUID = 1L;

	public GalleryDemoPage()
	{
		final SlidesPanel.Builder builder = new SlidesPanel.Builder("gallery");
		final String basePath = "gallery/";
		final String pic1 = basePath + "pic1.jpg";
		final String pic2 = basePath + "pic2.jpg";
		builder.addImage(pic1, pic1);
		builder.addImage(pic2, pic2);
		this.add(builder.showThumbs(true).timed(false).showArrow(true).fadeDuration(500)
				.size(800, 600).thumbSize(100, 75).build());
	}

	@Override
	public void renderHead(final IHeaderResponse response)
	{
		response.renderJavaScriptReference(new PackageResourceReference(WicketSlides.class,
				WicketSlides.MOOTOOLS));
		response.renderJavaScriptReference(new PackageResourceReference(WicketSlides.class,
				WicketSlides.MOOTOOLS_MORE));
		response.renderCSSReference(new PackageResourceReference(WicketSlides.class,
				WicketSlides.LAYOUT_CSS));
	}
}
